package com.zyh.homework.test02;

import java.util.Scanner;

public class Test2 {
    public static void main(String[] args) {
        System.out.println("请输入您的QQ号码");
        String qqNumber = new Scanner(System.in).next();
        boolean b = Test2.qqNum(qqNumber);
        if (b){
            System.out.println("这个QQ号码是否正确："+b);
        }
        else {
            System.out.println("这个QQ号码是否正确："+b);
        }
    }
    public static boolean qqNum(String s){
        if (s.length()>=5&&s.length()<=12&&!s.startsWith("0")){
            return true;
        }
        return false;
    }
}
